package com.dragee.utils.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author tys on 2023/5/6
 */
@Data
@ColumnWidth(20)
public class ExcelDemo {
    @ApiModelProperty(value = "登录账号")
    @ExcelProperty(value = "登录账号",index=0)
    @FieldDispose(type = ExcelFieldType.UNIQUE,value = "username",errorMessage = "登录账号不允许重复" )
    private String username;

    @ApiModelProperty(value = "姓名")
    @ExcelProperty(value = "姓名",index=1)
    @FieldDispose(type = ExcelFieldType.UNIQUE,value ="nickName",errorMessage = "姓名不允许重复" )
    private String nickName;

    @ApiModelProperty(value = "性别")
    @ExcelProperty(value = "性别",index=2)
    @FieldDispose(type = ExcelFieldType.UNIQUE, value = "sex", errorMessage = "该性别标识不存在" )
    private String sex;
}
